<template>
  <div class="wrap">
    <div>
      <img :src="logo" alt="pinia" />
    </div>
    <div>
      <p>{{ testStore.msg }}</p>
      <input type="text" v-model="text" />
    </div>
  </div>
</template>

<script lang="ts" setup>
import { computed } from "vue";
import logo from "@/assets/pinia.svg";
import useTestPinia from "@/store/useTestPinia";

const testStore = useTestPinia();

const text = computed({
  get() {
    return testStore.msg;
  },
  set(val: string) {
    testStore.setMsg(val);
  }
});
</script>

<style lang="scss">
img {
  width: 50px;
  height: 50px;
}
</style>
